<template lang="">
<div>
<input v-model="leftNum" />
+
<input v-model="right" />
<button @click="setResultNum">=</button>
{{ resultNum }}
</div>
</template>
<script>
export default {
data() {
return {
leftNum: 1,
right: 1,
resultNum: null
}
},
methods: {
setResultNum() {
this.resultNum = this.leftNum + this.right
}
}
}
</script>
<style lang="">
</style>